package com.chuan.base.util;

import java.text.DecimalFormat;

public class MoneyUtil {
	
	/**
	 * 
	 * @param money  
	 * @return
	 * #0.00
	 */
	public static String formatMoney(String money){
		DecimalFormat df=new DecimalFormat("0.00");
		Double num= Double.valueOf(money);
		return df.format(num);
	}
	
	/**
	 * 
	 * @param money  
	 * @return
	 * #0.00
	 */
	public static Double formatMoney(Double money){
		DecimalFormat df=new DecimalFormat("0.00");
	
		return Double.valueOf(df.format(money));
	}
	
	public static void main(String[] args) {
	System.out.println(MoneyUtil.formatMoney(500.1254));	
	}
}
